<template>
  <div class="upgradeLogDetail same-change-oldstyle">
      <div class="same-head-box">
        <div class="saem-seat-box">
          <div class="saem-seat-left">
            <!-- <span>当前位置：</span> -->
              <el-breadcrumb separator-class="el-icon-arrow-right">
              <el-breadcrumb-item to="/upgradeLogManage">更新日志</el-breadcrumb-item>
              <el-breadcrumb-item >更新日志详情</el-breadcrumb-item>
            </el-breadcrumb>
          </div>
          <div class="saem-seat-right">
            <button class="same-search-btns same-search-export" @click="RefreshFun">刷新</button>
            <button class="same-search-btns" @click="returnBack">返回</button>
          </div>
        </div>
      </div>
      <div class="contentBox">
        <!-- <div class="btn_all">
          <button type="" @click='jumpback()' class="btn_back">返回</button>
        </div> -->
        <span class="title">{{title}}</span>
        <p class="author"><span>作者：{{author}}</span>  <span class="dateshow">{{create_time}}</span>  <span class="othercolor">发布中</span>  </p>
        <div class="contentdetail" v-html="content">
        </div>
      </div>
  </div>
</template>
<script>
  export default {
    name: 'upgradeLogDetail',
    data: function () {
      return {
          id:this.$route.query.id?this.$route.query.id:'',
          title:"",
          author:"",
          create_time:"",
          content:"",
      }
    },
    // 初始化执行
    created: function () {
        var that = this;
        var id = that.id;
        that.noticeDetails(id);
    },
    computed:{

    },
    inject: ["reload"],
    methods: {
      RefreshFun() {
        // 调用reload方法，刷新整个页面
        this.reload();
      },
      //返回
      returnBack() {
        this.$router.back(-1);
      },
      jumpback(){
          this.$router.back(-1)
      },
      //删除
      opendelete() {
        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$message({
            type: 'success',
            message: '删除成功!'
          });
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
        });
      },
      // 获取数据
      noticeDetails: function (version_id) {
            var that = this;
            // ajax请求
            if(version_id==''){
              this.$message({
                type:'error',
                showClose: true,
                message: '公告编号不存在,请返回重新选择公告',
                center: true
              });
              return false;
            }
            that.$post({
                url: 'Common/Version/versionDetail',
                data: { version_id },
                success: (data)=> {
                    if (data.code == 1000) {
                        that.title = data.data.title;
                        that.author = data.data.author;
                        that.create_time = data.data.create_time;
                        that.content = data.data.content;
                    }
                }
            })
      },
    },

    mounted (){}
  }
</script>
<style>
.upgradeLogDetail{
  width: 100%;
  height:100%;
  background: #FFFFFF;
}
.upgradeLogDetail .contentBox{
  width: 90%;
  display: flex;
  flex-direction: column;
  margin:15px 40px;
}
.btn_all{
  padding:0px 0px 20px 0px;
}
.btn_blu{
  color:#fff;
  background: #176D9B;
  height: 30px;
  width: 60px;
  border:none;
  border-radius: 4px;
  margin-right: 20px;
  line-height: 7px;
}
.btn_back{
  background: #ECEBEB;width: 60px;
  height: 30px;
  color:#3A3635;
  border:1px solid #DEDBD9;
  border-radius: 4px;
}
.title{
  color:#4A4644;
  font-size: 18px;
}
.author{
  font-size: 14px;
  color:#A9A8A6;
  padding:10px 0px  20px 0px;
}
.dateshow{
  margin:0px 10px 0px 20px;
}
.othercolor{
  color:#2A749D;
}
.contentdetail{
  color:#635E5B;
  line-height: 32px;
}
</style>
